plat/arm/sgi: Use NT_FW_CONFIG instead of HW_CONFIG
authorChandni Cherukuri <[email protected]>
Wed, 28 Nov 2018 05:56:19 +0000 (11:26 +0530)
committerChandni Cherukuri <[email protected]>
Wed, 5 Dec 2018 16:45:51 +0000 (22:15 +0530)
With the two new APIs 'plat_arm_sgi_get_platform_id' and
'plat_arm_sgi_get_config_id' that are available now, BL31 need not
depend on hw_config device tree to identify the platform. In addition
to this, the existing hardware description in hw_config can be limited
to use by BL33 and not by the operating system.

So the hardware description from hw_config dts can be moved into
nt_fw_config dts and the use of hw_config dts can be removed.

Change-Id: I873b7e1e72823d3ec5d253a848e85ae724f09e49
Signed-off-by: Chandni Cherukuri <[email protected]>
plat/arm/board/sgi575/fdts/sgi575.dts [deleted file]
plat/arm/board/sgi575/fdts/sgi575_nt_fw_config.dts [new file with mode: 0644]
plat/arm/board/sgi575/fdts/sgi575_tb_fw_config.dts
plat/arm/board/sgi575/platform.mk
plat/arm/board/sgiclarka/fdts/sgiclarka.dts [deleted file]
plat/arm/board/sgiclarka/fdts/sgiclarka_nt_fw_config.dts [new file with mode: 0644]
plat/arm/board/sgiclarka/fdts/sgiclarka_tb_fw_config.dts
plat/arm/board/sgiclarka/platform.mk
plat/arm/css/sgi/sgi_image_load.c

diff --git a/plat/arm/board/sgi575/fdts/sgi575.dts b/plat/arm/board/sgi575/fdts/sgi575.dts
deleted file mode 100644 (file)
index 1e1ea14..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/dts-v1/;
-/ {
-       /* compatible string */
-       compatible = "arm,sgi575";
-
-       /*
-        * Place holder for system-id node with default values. The
-        * value of platform-id and config-id will be set to the
-        * correct values during the BL2 stage of boot.
-        */
-       system-id {
-               platform-id = <0x0>;
-               config-id = <0x0>;
-       };
-};
diff --git a/plat/arm/board/sgi575/fdts/sgi575_nt_fw_config.dts b/plat/arm/board/sgi575/fdts/sgi575_nt_fw_config.dts
new file mode 100644 (file)
index 0000000..1e1ea14
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/dts-v1/;
+/ {
+       /* compatible string */
+       compatible = "arm,sgi575";
+
+       /*
+        * Place holder for system-id node with default values. The
+        * value of platform-id and config-id will be set to the
+        * correct values during the BL2 stage of boot.
+        */
+       system-id {
+               platform-id = <0x0>;
+               config-id = <0x0>;
+       };
+};
index 315fa6999ce556a270791e5fbf88fdabd41236e7..b14d7adca96ab54d0110986add89f2dd559046a0 100644 (file)
@@ -9,8 +9,8 @@
 / {
        /* Platform Config */
        compatible = "arm,tb_fw";
-       hw_config_addr = <0x0 0xFEF00000>;
-       hw_config_max_size = <0x0100000>;
+       nt_fw_config_addr = <0x0 0xFEF00000>;
+       nt_fw_config_max_size = <0x0100000>;
        /*
         * The following two entries are placeholders for Mbed TLS
         * heap information. The default values don't matter since
index f31a8b730c0f891140338e9243f0775990bae0d7..e72225d370d3739c46260ba0a6c62e2df6a149c6 100644 (file)
@@ -33,8 +33,8 @@ TB_FW_CONFIG          :=      ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
 # Add the TB_FW_CONFIG to FIP and specify the same to certtool
 $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config))
 
-FDT_SOURCES            +=      ${SGI575_BASE}/fdts/${PLAT}.dts
-HW_CONFIG              :=      ${BUILD_PLAT}/fdts/${PLAT}.dtb
+FDT_SOURCES            +=      ${SGI575_BASE}/fdts/${PLAT}_nt_fw_config.dts
+NT_FW_CONFIG           :=      ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
 
-# Add the HW_CONFIG to FIP and specify the same to certtool
-$(eval $(call TOOL_ADD_PAYLOAD,${HW_CONFIG},--hw-config))
+# Add the NT_FW_CONFIG to FIP and specify the same to certtool
+$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config))
diff --git a/plat/arm/board/sgiclarka/fdts/sgiclarka.dts b/plat/arm/board/sgiclarka/fdts/sgiclarka.dts
deleted file mode 100644 (file)
index 43bd856..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/dts-v1/;
-/ {
-       /* compatible string */
-       compatible = "arm,sgi-clark";
-
-       /*
-        * Place holder for system-id node with default values. The
-        * value of platform-id and config-id will be set to the
-        * correct values during the BL2 stage of boot.
-        */
-       system-id {
-               platform-id = <0x0>;
-               config-id = <0x0>;
-       };
-};
diff --git a/plat/arm/board/sgiclarka/fdts/sgiclarka_nt_fw_config.dts b/plat/arm/board/sgiclarka/fdts/sgiclarka_nt_fw_config.dts
new file mode 100644 (file)
index 0000000..43bd856
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/dts-v1/;
+/ {
+       /* compatible string */
+       compatible = "arm,sgi-clark";
+
+       /*
+        * Place holder for system-id node with default values. The
+        * value of platform-id and config-id will be set to the
+        * correct values during the BL2 stage of boot.
+        */
+       system-id {
+               platform-id = <0x0>;
+               config-id = <0x0>;
+       };
+};
index 315fa6999ce556a270791e5fbf88fdabd41236e7..b14d7adca96ab54d0110986add89f2dd559046a0 100644 (file)
@@ -9,8 +9,8 @@
 / {
        /* Platform Config */
        compatible = "arm,tb_fw";
-       hw_config_addr = <0x0 0xFEF00000>;
-       hw_config_max_size = <0x0100000>;
+       nt_fw_config_addr = <0x0 0xFEF00000>;
+       nt_fw_config_max_size = <0x0100000>;
        /*
         * The following two entries are placeholders for Mbed TLS
         * heap information. The default values don't matter since
index 0773be5bbbee78be65d2345635ba4bb288eeda8d..1a8b157de76ea8fe1fc507805f4be644aeeea225 100644 (file)
@@ -33,10 +33,10 @@ TB_FW_CONFIG                :=      ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
 # Add the TB_FW_CONFIG to FIP and specify the same to certtool
 $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config))
 
-FDT_SOURCES            +=      ${SGICLARKA_BASE}/fdts/${PLAT}.dts
-HW_CONFIG              :=      ${BUILD_PLAT}/fdts/${PLAT}.dtb
+FDT_SOURCES            +=      ${SGICLARKA_BASE}/fdts/${PLAT}_nt_fw_config.dts
+NT_FW_CONFIG           :=      ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
 
-# Add the HW_CONFIG to FIP and specify the same to certtool
-$(eval $(call TOOL_ADD_PAYLOAD,${HW_CONFIG},--hw-config))
+# Add the NT_FW_CONFIG to FIP and specify the same to certtool
+$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config))
 
 override CTX_INCLUDE_AARCH32_REGS      := 0
index 39069ca3ece9d47319a1117927405e452d2f2a4b..e078bd2af09320ca0b179027038f918ca2146f6e 100644 (file)
@@ -25,9 +25,9 @@ static int plat_sgi_append_config_node(void)
        int nodeoffset, err;
        unsigned int platid = 0, platcfg = 0;
 
-       mem_params = get_bl_mem_params_node(HW_CONFIG_ID);
+       mem_params = get_bl_mem_params_node(NT_FW_CONFIG_ID);
        if (mem_params == NULL) {
-               ERROR("HW CONFIG base address is NULL");
+               ERROR("NT_FW CONFIG base address is NULL");
                return -1;
        }
 
@@ -35,7 +35,7 @@ static int plat_sgi_append_config_node(void)
 
        /* Check the validity of the fdt */
        if (fdt_check_header(fdt) != 0) {
-               ERROR("Invalid HW_CONFIG DTB passed\n");
+               ERROR("Invalid NT_FW_CONFIG DTB passed\n");
                return -1;
        }